﻿@using Coslen.Framework.Helpers
@model Coslen.TahorCRM.Domain.Entities.ViewModels.Editing.ContactDetailEditViewModel

<div class="contactDetail_DisplayLine">
    <div class="info">
        @Html.HiddenFor(model => model.ContactDetail.ContactDetailId)
        @Html.DisplayFor(model => model.ContactDetail.DisplayContactDetail)
    </div>
    <div class="type">
        @Html.DisplayFor(model => model.ContactDetail.ContactDetailType.Name)
    </div>
    <div class="displaybool">
        @Html.DisplayFor(model => model.ContactDetail.IsPrimary)
    </div>
    <div class="displaybool">
        @Html.DisplayFor(model => model.ContactDetail.DoNotUse)
    </div>
    <div class="tool">
        @if (User.IsInRole("CanEditContact"))
        {
            @Html.ImageActionLink(
                Url.Content("~/Content/Images/edit.png"),
                "Edit",
                "Edit",
                "ContactDetail",
                new {area = "Contacts", id = Model.ContactDetail.ContactDetailId, source = "Contact:Details:" + Model.ContactDetail.EntityLink.ContactId},
                new {@class = ""},
                new {@class = "actionIcon"})

            @Html.ImageActionLink(
                Url.Content("~/Content/Images/delete.png"),
                "Delete",
                "Delete",
                "ContactDetail",
                new {area = "Contacts", id = Model.ContactDetail.ContactDetailId, source = "Contact:Details:" + Model.ContactDetail.EntityLink.ContactId},
                new {@class = ""},
                new {@class = "actionIcon"})
        }
    </div>
</div>